<template>
  <div>
    <h3>{{ title || "Item" }}组件</h3>
    <p v-if="id === '001'">DNF简介</p>
    <p v-if="id === '002'">CF简介</p>
    <p v-if="id === '003'">LOL简介</p>

    <strong>{{ it }}</strong>
    <hr />
    <strong>props中age---{{ age }}</strong>
  </div>
</template>

<script>
export default {
  name: "Item",
  mounted() {
    // console.log(this.$route.params.id);
    console.log(this.$route.meta);
  },
  // 路由配置里面props属性值为true 可以直接在组件中使用props接收params参数
  props: ["id", "title", "age", "it"],
  data() {
    return {};
  },
};
</script>

<style></style>
